.class Lcom/waiqin365/h5/ui/c;
.super Ljava/lang/Object;

# interfaces
.implements Ljava/lang/Runnable;


# instance fields
.field final synthetic a:Lcom/waiqin365/h5/ui/WqNewSelectUI;


# direct methods
.method constructor <init>(Lcom/waiqin365/h5/ui/WqNewSelectUI;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 5

    const/4 v0, 0x0

    :try_start_0
    new-instance v2, Lorg/json/JSONObject;

    iget-object v1, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-static {v1}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->a(Lcom/waiqin365/h5/ui/WqNewSelectUI;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v2, v1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    iget-object v3, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    const-string/jumbo v1, "data"

    invoke-virtual {v2, v1}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    const-string/jumbo v1, "data"

    invoke-virtual {v2, v1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    :goto_0
    invoke-static {v3, v1}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->a(Lcom/waiqin365/h5/ui/WqNewSelectUI;Ljava/lang/String;)Ljava/lang/String;

    iget-object v3, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    const-string/jumbo v1, "title"

    invoke-virtual {v2, v1}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_1

    const-string/jumbo v1, "title"

    invoke-virtual {v2, v1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    :goto_1
    invoke-static {v3, v1}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->b(Lcom/waiqin365/h5/ui/WqNewSelectUI;Ljava/lang/String;)Ljava/lang/String;

    iget-object v3, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    const-string/jumbo v1, "selectIds"

    invoke-virtual {v2, v1}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_2

    const-string/jumbo v1, "selectIds"

    invoke-virtual {v2, v1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    :goto_2
    invoke-static {v3, v1}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->c(Lcom/waiqin365/h5/ui/WqNewSelectUI;Ljava/lang/String;)Ljava/lang/String;

    iget-object v3, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    const-string/jumbo v1, "multiple"

    invoke-virtual {v2, v1}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_3

    const/4 v1, 0x1

    :goto_3
    invoke-static {v3, v1}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->a(Lcom/waiqin365/h5/ui/WqNewSelectUI;Z)Z

    iget-object v1, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-static {v1}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->b(Lcom/waiqin365/h5/ui/WqNewSelectUI;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_8

    new-instance v2, Lorg/json/JSONArray;

    iget-object v1, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-static {v1}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->b(Lcom/waiqin365/h5/ui/WqNewSelectUI;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v2, v1}, Lorg/json/JSONArray;-><init>(Ljava/lang/String;)V

    if-eqz v2, :cond_6

    invoke-virtual {v2}, Lorg/json/JSONArray;->length()I

    move-result v1

    if-lez v1, :cond_6

    move v1, v0

    :goto_4
    invoke-virtual {v2}, Lorg/json/JSONArray;->length()I

    move-result v0

    if-ge v1, v0, :cond_6

    invoke-virtual {v2, v1}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v3

    new-instance v4, Lcom/waiqin365/h5/ui/b/a;

    invoke-direct {v4}, Lcom/waiqin365/h5/ui/b/a;-><init>()V

    const-string/jumbo v0, "id"

    invoke-virtual {v3, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_4

    const-string/jumbo v0, "id"

    invoke-virtual {v3, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    :goto_5
    iput-object v0, v4, Lcom/waiqin365/h5/ui/b/a;->a:Ljava/lang/String;

    const-string/jumbo v0, "name"

    invoke-virtual {v3, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_5

    const-string/jumbo v0, "name"

    invoke-virtual {v3, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    :goto_6
    iput-object v0, v4, Lcom/waiqin365/h5/ui/b/a;->b:Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-static {v0}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->c(Lcom/waiqin365/h5/ui/WqNewSelectUI;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_4

    :cond_0
    const-string/jumbo v1, "[]"

    goto/16 :goto_0

    :cond_1
    const-string/jumbo v1, ""

    goto/16 :goto_1

    :cond_2
    const-string/jumbo v1, ""

    goto :goto_2

    :cond_3
    move v1, v0

    goto :goto_3

    :cond_4
    const-string/jumbo v0, ""

    goto :goto_5

    :cond_5
    const-string/jumbo v0, ""

    goto :goto_6

    :cond_6
    iget-object v0, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-static {v0}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->d(Lcom/waiqin365/h5/ui/WqNewSelectUI;)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_7

    iget-object v0, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-static {v0}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->d(Lcom/waiqin365/h5/ui/WqNewSelectUI;)Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v1, ","

    invoke-virtual {v0, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-static {v1}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->e(Lcom/waiqin365/h5/ui/WqNewSelectUI;)Ljava/util/List;

    move-result-object v1

    invoke-interface {v1}, Ljava/util/List;->clear()V

    iget-object v1, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-static {v1}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->e(Lcom/waiqin365/h5/ui/WqNewSelectUI;)Ljava/util/List;

    move-result-object v1

    invoke-static {v0}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v1, v0}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    :cond_7
    invoke-static {}, Lcom/waiqin365/lightapp/view/a/b;->a()Ljava/util/Observable;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-virtual {v0, v1}, Ljava/util/Observable;->addObserver(Ljava/util/Observer;)V

    new-instance v1, Landroid/content/Intent;

    iget-object v0, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-static {v0}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->f(Lcom/waiqin365/h5/ui/WqNewSelectUI;)Lorg/apache/cordova/WqCordovaActivity;

    move-result-object v0

    const-class v2, Lcom/waiqin365/lightapp/dailyreport/SimpleSelectMultActivity;

    invoke-direct {v1, v0, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string/jumbo v2, "list"

    iget-object v0, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-static {v0}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->c(Lcom/waiqin365/h5/ui/WqNewSelectUI;)Ljava/util/List;

    move-result-object v0

    check-cast v0, Ljava/io/Serializable;

    invoke-virtual {v1, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    const-string/jumbo v2, "selected"

    iget-object v0, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-static {v0}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->e(Lcom/waiqin365/h5/ui/WqNewSelectUI;)Ljava/util/List;

    move-result-object v0

    check-cast v0, Ljava/io/Serializable;

    invoke-virtual {v1, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    iget-object v0, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-static {v0}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->g(Lcom/waiqin365/h5/ui/WqNewSelectUI;)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_9

    const-string/jumbo v0, "title"

    iget-object v2, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-static {v2}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->f(Lcom/waiqin365/h5/ui/WqNewSelectUI;)Lorg/apache/cordova/WqCordovaActivity;

    move-result-object v2

    const v3, 0x7f080723

    invoke-virtual {v2, v3}, Lorg/apache/cordova/WqCordovaActivity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v0, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    :goto_7
    const-string/jumbo v0, "isSingleSelect"

    iget-object v2, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-static {v2}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->h(Lcom/waiqin365/h5/ui/WqNewSelectUI;)Z

    move-result v2

    invoke-virtual {v1, v0, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    const-string/jumbo v0, "returnTo"

    iget-object v2, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-static {v2}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->i(Lcom/waiqin365/h5/ui/WqNewSelectUI;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v0, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    iget-object v0, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-static {v0}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->f(Lcom/waiqin365/h5/ui/WqNewSelectUI;)Lorg/apache/cordova/WqCordovaActivity;

    move-result-object v0

    invoke-virtual {v0, v1}, Lorg/apache/cordova/WqCordovaActivity;->startActivity(Landroid/content/Intent;)V

    iget-object v0, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-static {v0}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->f(Lcom/waiqin365/h5/ui/WqNewSelectUI;)Lorg/apache/cordova/WqCordovaActivity;

    move-result-object v0

    const v1, 0x7f040022

    const v2, 0x7f040021

    invoke-virtual {v0, v1, v2}, Landroid/app/Activity;->overridePendingTransition(II)V

    :cond_8
    :goto_8
    return-void

    :cond_9
    const-string/jumbo v0, "title"

    iget-object v2, p0, Lcom/waiqin365/h5/ui/c;->a:Lcom/waiqin365/h5/ui/WqNewSelectUI;

    invoke-static {v2}, Lcom/waiqin365/h5/ui/WqNewSelectUI;->g(Lcom/waiqin365/h5/ui/WqNewSelectUI;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v0, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_7

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    goto :goto_8
.end method
